package com.rc.saas.tenant.vo.operator;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.rc.saas.tenant.common.utils.StringUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author frog
 * @date 2021/7/16
 */
@ExcelIgnoreUnannotated
public class OperatorElecStationVo {
    private Long elecStationId;
    private Long operatorStationId;
    private String tenantCode;
    private String tenantOperatorCode;
    @ExcelProperty(value = "分销商名称", index = 1)
    private String operatorName;
    @ExcelProperty(value = "账号", index = 0)
    private String loginName;
    @ExcelProperty(value = "站点名称", index = 2)
    private String stationName;
    //政府平台对接类型 0运营商政府申报 1分销商政府申报  默认0
    private String govtHlhtType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "开通运营时间", index = 6)
    private Date operateStartTime;
    @ExcelProperty(value = "直流桩", index = 3)
    private Integer directCurrentPile;
    @ExcelProperty(value = "交流桩", index = 4)
    private Integer exchangePile;
    @ExcelProperty(value = "总功率(KW)", index = 5)
    private Integer pileTotalPower;
    //规则有效时间
    private String ruleEndTime;
    private String ruleStartTime;

    @ExcelProperty(value = "规则有效时间", index = 7)
    private String effectiveDate;

    public String getEffectiveDate() {
        if (StringUtil.isBlank(ruleStartTime) && StringUtil.isBlank(ruleStartTime)) {
            return "-";
        } else {
            return ruleStartTime + "至" + ruleEndTime;
        }
    }

    public void setEffectiveDate(String effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public Long getElecStationId() {
        return elecStationId;
    }

    public void setElecStationId(Long elecStationId) {
        this.elecStationId = elecStationId;
    }

    public Date getOperateStartTime() {
        return operateStartTime;
    }

    public void setOperateStartTime(Date operateStartTime) {
        this.operateStartTime = operateStartTime;
    }

    public String getRuleEndTime() {
        return ruleEndTime;
    }

    public void setRuleEndTime(String ruleEndTime) {
        this.ruleEndTime = ruleEndTime;
    }

    public String getRuleStartTime() {
        return ruleStartTime;
    }

    public void setRuleStartTime(String ruleStartTime) {
        this.ruleStartTime = ruleStartTime;
    }

    public Integer getDirectCurrentPile() {
        return directCurrentPile;
    }

    public void setDirectCurrentPile(Integer directCurrentPile) {
        this.directCurrentPile = directCurrentPile;
    }

    public Integer getExchangePile() {
        return exchangePile;
    }

    public void setExchangePile(Integer exchangePile) {
        this.exchangePile = exchangePile;
    }

    public Integer getPileTotalPower() {
        return pileTotalPower;
    }

    public void setPileTotalPower(Integer pileTotalPower) {
        this.pileTotalPower = pileTotalPower;
    }

    public Long getOperatorStationId() {
        return operatorStationId;
    }

    public void setOperatorStationId(Long operatorStationId) {
        this.operatorStationId = operatorStationId;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getGovtHlhtType() {
        return govtHlhtType;
    }

    public void setGovtHlhtType(String govtHlhtType) {
        this.govtHlhtType = govtHlhtType;
    }

    public String getTenantOperatorCode() {
        return tenantOperatorCode;
    }

    public void setTenantOperatorCode(String tenantOperatorCode) {
        this.tenantOperatorCode = tenantOperatorCode;
    }

    public String getTenantCode() {
        return tenantCode;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }
}
